<template>
  <div class="edit">
    <div class="edit-item">
      <span class="label">修改头像</span>
      
        <img :src="fanData.UImg" width="200px" height="150px" />
      
    </div>
    <div class="edit-item">
      <span class="label">修改名称</span>
      <div>
        <el-input
          v-model="fanData.UName"
          class="create-input"
          placeholder="请输入内容"
        ></el-input>
      </div>
    </div>
    <div class="edit-item">
      <span class="label">个人简介</span>
      <div>
        <el-input
          v-model="fanData.USynopsis"
          type="textarea"
          class="create-input"
          placeholder="请输入内容"
        >{{fanData.USynopsis}}</el-input>
      </div>
    </div>
    <div>
      <el-button class="send" type="primary" size="medium" @click="save"
        >保存</el-button
      >
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      fanData: 
        {
          UName: "",
          UImg: "",
          USynopsis: "",
        },
    };
  },
  methods: {
    //   fan(){
    //       this.$axios.get('http://localhost:55943/api/Fan?id='+this.$route.params.id).then(res=>{
    //           this.fanData=res.data;
    //       })
    //   }
    save() {},
  },
  created() {
    this.fanData = this.$route.query;
    console.log(this.fanData);
  },
};
</script>

<style>
.edit {
  background-color: #fff;
  padding: 10px 0 20px 20px;
  margin: 0 auto;
  width: 80%;
  margin-top: 40px;
}

.edit-item {
  display: flex;
  margin-bottom: 20px;
}
.label {
  margin-right: 10px;
}
</style>